can we generate alphanumeric 6 digit primary key in phpmyadmin

42

SELECT str_rand(6, '23456789abcdefghijkmnpqrstuvwxyz');
mysql> update DemoTable
set Value=LPAD(FLOOR(RAND() * 999999.99), 6, '0');
Query OK, 6 rows affected (0.15 sec)
Rows matched: 6 Changed: 6 Warnings: 0

Comments

Submit
0 Comments